
import SerialPort from 'serialport';


export default function DeviceList(){
    SerialPort.list(port=>{
        console.log(port.comName)
    })
}
//监听串口
function listen(com) {
    const port = new SerialPort(com)
    port.on('data',function(data){
        console.log(data)
    })
}